package com.atguigu.springcloud.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.stereotype.Component;

/**
 * 该类作为服务降级的处理类,使得调用方法与降级的处理类一一对应
 * 防止代码逻辑与服务降级处理代码混乱
 */
@Component
public class PaymentFallbackService implements HystrixService{
    @Override
    public String paymentInfo_OK(Integer id) {
        return "paymentInfo_OK无法得到服务器的响应|客户端超时|客户端运行报错";
    }

    @Override
    public String paymentInfo_TimeOut(Integer id) {
        return "paymentInfo_TimeOut无法得到服务器的响应|客户端超时|客户端运行报错";
    }
}
